<!--  -->
<template>
  <div>
    <h1>我是Home的内容</h1>
    <!-- 练习路由的多级嵌套 -->
    <ul class="nav nav-tabs">
      <li>
        <router-link class="list-group-item"
                     active-class="active"
                     to="/home/news">News</router-link>
      </li>
      <li>
        <router-link class="list-group-item"
                     active-class="active"
                     to="/home/message">Message</router-link>
      </li>
    </ul>
    <!-- 保存缓存 -->
    <!-- <keep-alive :include="['News','Message']"> -->
    <keep-alive>
      <router-view></router-view>
    </keep-alive>
  </div>
</template>

<script>
export default {
  name: "Home",
  data () {
    return {

    }
  },
  //生命周期 - 创建完成（访问当前this实例）
  created () {

  },
  //生命周期 - 挂载完成（访问DOM元素）
  mounted () {
  }
}
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>